home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI550.ASC < prev    next >
Text File  |  1992-08-12  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  550
  9.   VERSION  :  3.x
  10.        OS  :  PC DOS
  11.      DATE  :  August 12, 1992                          PAGE  :  1/2
  12.  
  13.     TITLE  :  CROSSTABS
  14.  
  15.  
  16.  
  17.  
  18.   Assuming that your table looks something like this:
  19.  
  20.         TEST══╦══F1══╦══F2══╦══F3══╦═F4═╗
  21.             1 ║  y   ║  n   ║  n   ║  x ║
  22.             2 ║  y   ║  y   ║  n   ║  x ║
  23.             3 ║  y   ║  n   ║  y   ║  x ║
  24.             4 ║  n   ║  y   ║  n   ║  x ║
  25.  
  26.  
  27.   and the query looks like:
  28.  
  29.     TEST╦══════════F1═══════════╦F2╦F3╦═════════════F4═══════════════╗
  30.         ║y,calc count all as amt║  ║  ║calc "Y" as ans,calc f1 as fld║
  31.         ║n,calc count all as amt║  ║  ║calc "N" as ans,calc f1 as fld║
  32.         ║calc count all as amt  ║y ║  ║calc "Y" as ans,calc f2 as fld║
  33.         ║calc count all as amt  ║n ║  ║calc "N" as ans,calc f2 as fld║
  34.         ║calc count all as amt  ║  ║y ║calc "Y" as ans,calc f3 as fld║
  35.         ║calc count all as amt  ║  ║n ║calc "N" as ans,calc f3 as fld║
  36.  
  37.  
  38.   will yield the following answer table:
  39.  
  40.         ANSWER═╦══════Amt══════╦Ans═╦═Fld═╗
  41.              1 ║         1     ║  N ║  f1 ║
  42.              2 ║         1     ║  Y ║  f3 ║
  43.              3 ║         2     ║  N ║  f2 ║
  44.              4 ║         2     ║  Y ║  f2 ║
  45.              5 ║         3     ║  N ║  f3 ║
  46.              6 ║         3     ║  Y ║  f1 ║
  47.  
  48.  
  49.   You can change the sort order of the answer table.  Use
  50.   F10/Modify/Sort on the answer table by the "Fld" as 1 and "Ans"
  51.   as 2 to yield:
  52.  
  53.         ANSWER═╦══════Amt══════╦Ans═╦═Fld═╗
  54.              1 ║         1     ║  N ║  f1 ║
  55.              2 ║         3     ║  Y ║  f1 ║
  56.              3 ║         2     ║  N ║  f2 ║
  57.              4 ║         2     ║  Y ║  f2 ║
  58.              5 ║         3     ║  N ║  f3 ║
  59.              6 ║         1     ║  Y ║  f3 ║
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  PARADOX                                NUMBER  :  550
  75.   VERSION  :  3.x
  76.        OS  :  PC DOS
  77.      DATE  :  August 12, 1992                          PAGE  :  2/2
  78.  
  79.     TITLE  :  CROSSTABS
  80.  
  81.  
  82.  
  83.  
  84.   You could also rotate the answer table as follows:
  85.  
  86.         ANSWER═╦═Fld═╦Ans═╦══════Amt══════╗
  87.              1 ║  f1 ║  N ║         1     ║
  88.              2 ║  f1 ║  Y ║         3     ║
  89.              3 ║  f2 ║  N ║         2     ║
  90.              4 ║  f2 ║  Y ║         2     ║
  91.              5 ║  f3 ║  N ║         3     ║
  92.              6 ║  f3 ║  Y ║         1     ║
  93.  
  94.  
  95.   Lastly, if you like, you could change this to a crosstab by
  96.   pressing F10/Image/Graph/Crosstab/Sum.  Place the cursor in the
  97.   "Fld" field to assign this as the row labels, press <Enter>, move
  98.   right to the "Ans" field and press <Enter> to select it as the
  99.   column labels, and then move right once again and press <Enter>
  100.   to have the "Amt" values as the crosstab values to be calculated.
  101.   The result will be:
  102.  
  103.         CROSSTAB╦═Fld═╦═══════N═══════╦═══════Y═══════╗
  104.              1  ║  f1 ║         1     ║         3     ║
  105.              2  ║  f2 ║         2     ║         2     ║
  106.              3  ║  f3 ║         3     ║         1     ║
  107.  
  108.   DISCLAIMER: You have the right to use this technical information
  109.   subject to the terms of the No-Nonsense License Statement that
  110.   you received with the Borland product to which this information
  111.   pertains.
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.